<template>
  <div id="app">
    <header>
      <h1>电商用户转化路径分析</h1>
      <p>使用桑基图可视化用户在电子商务网站上的旅程</p>
    </header>

    <main>
      <SankeyChart/>
    </main>

    <footer>
      <p>基于 Vue3 和 D3.js 的数据可视化展示  作者：王德高</p>
    </footer>
  </div>
</template>

<script>

import {defineComponent} from "vue";
import SankeyChart from "./components/SankeyChart.vue";

export default defineComponent({
  components: {SankeyChart}
})
</script>

<style>
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #1e293b;
  background-color: #f1f5f9;
  padding: 20px;
}

#app {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #1e293b;
}

header p {
  font-size: 1.1rem;
  color: #475569;
}

footer {
  text-align: center;
  margin-top: 30px;
  padding: 20px;
  color: #64748b;
  font-size: 0.9rem;
}

.sankey-tooltip {
  position: absolute;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  z-index: 1000;
  pointer-events: none;
  transition: opacity 0.2s;
  min-width: 180px;
}

.sankey-tooltip div {
  margin: 3px 0;
}
</style>